var express = require('express');
var router = express.Router();
const student =require('../dao/student_dao')

router.get('/', function(req, res, next) {
  res.send('respond with a resource');
});
//获取通告
router.get('/getNotice',function (req,res) {
  student.getNotice(req,res)
})
//获取已读通告
router.get('/getNoticeRead',function (req,res) {
  student.getNoticeRead(req,res)
})
//通告未读转已读
router.get('/goReadily',function (req,res) {
  student.goReadily(req,res)
})
//添加健康报表
router.post('/setHealty',function(req,res){
  student.setHealty(req,res)
})

//获取当天的健康报表
router.get('/getHealtyNowaday',function (req,res) {
  student.getHealtyNowaday(req,res)
})

//获取当天某用户的健康报表
router.get('/getHealtyNowadaByid',function (req,res) {
  student.getHealtyNowadaByid(req,res)
})

router.get('/getuserinfo',function (req,res) {
  student.getuserinfo(req,res)
})
//请假申请
router.post('/setleave',function (req,res) {
  student.setleave(req,res)
})

//获取用户自己的所有请假单
router.get('/getleavebyid',function (req,res) {
  student.getleavebyid(req,res)
})
module.exports = router;
